<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title></title>
    <style>
        /*重置样式*/
        *{
            margin: 0;
            padding: 0;
        }
        .parent{
            font-size: 0;
        }
        .box{
            font-size: 14px;
            margin: 0px;
            display: inline-block;
            border: 1px solid rebeccapurple;
        }
        .test{
            margin: 0px  auto;
            text-align: center;
            width: 200px;
            height: 100px;
            border:  1px solid rebeccapurple;
        }
    </style>
</head>
<body><div class="parent">
    <div class="box">
        <span>测试1</span>
    </div>
    <div class="box">
        <span>测试2</span>
    </div>
  <div class="test">
      <span>测试</span>
  </div>
</div>
</body>
</html>